/*
        The directives starting with # below ensures that this file is read by the compiler only once
        even if it is #included several times. It is call an "include guard"
*/
#ifndef CATEGORY_H_
#define CATEGORY_H_

#include <string>

using namespace std;

struct Category {
public:
        // constructors
        Category () {}
        Category (int id, string name) 
                : cat_id(id), cat_name(name) {}

    // utility functions
        string display() const {
                string disp = "";
                disp = cat_name;
                return disp;
        };
/* 
The following utility functions were written by Eric Heisler
*/
        int get_cat_id() const {
                return cat_id;
        };
	string get_cat_name() const {
		return cat_name;
	}; 
	
	/* MGM B.3 b: START */
	//string getCatName() const {return cat_name;};
	/* MGM B.3 b: END */
	
	//MGM D3: override the operator < to sort the category based on category ID
	bool operator < (const Category& c) const
	{
		return (cat_id < c.cat_id);
	}
		
private:
   //constants
     
   // private data
        int cat_id;
        string cat_name;
};

#endif //CATEGORY_H_
